home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16736 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  636 b 

  1. Path: sierra.net!usenet
  2. From: TGColwell <snowbull@sierra.net>
  3. Newsgroups: comp.lang.c++
  4. Subject: Help with typecasting (easy one)...
  5. Date: Thu, 11 Apr 1996 20:49:27 -0700
  6. Organization: Sierra-Net
  7. Message-ID: <316DD2C7.4566@sierra.net>
  8. NNTP-Posting-Host: 204.94.232.59
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (WinNT; I)
  13.  
  14. Can someone tell me what the differences are between the 
  15. following notations and when to use which one:
  16.  
  17. x = float(int_var)
  18. x = (float)int_var
  19.  
  20. Also, are these equivalent:
  21.  
  22. x = float(3)
  23. x = 3.0f
  24.  
  25.  
  26. Thanks!  Responses via e-mail please!
  27.  
  28. -TC
  29.